<?php

use Illuminate\Database\Seeder;

class HouseTableSeeder extends Seeder
{
    protected $attr  =  [
        1,
        5,
        8,
        10,
        21,
        24,
        26,
    ];
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $attr = $this->attr;
        $arr = [];
        factory(\App\Models\House\House::class,100)->create()->map(function($item)use($attr,&$arr){
            foreach ($attr as $key=>$val) {
                array_push($arr, [
                    'param_id' => $val,
                    'house_id' => $item->id
                ]);
            }
        });

//       \App\Models\House\HouseAttribute::query()->insert($arr);
        /**
         *
        1
        5
        8
        10
        21
        24
        26
         */


    }



    //

}
